package com.tencreat.domain.mall;

import com.baomidou.mybatisplus.annotation.*;
import com.tencreat.common.annotation.Excel;
import com.tencreat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;


/**
 * 积分商品对象 mall_integral_goods
 *
 * @author tencreat
 * @date 2021-09-01
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@TableName("mall_integral_goods")
public class MallIntegralGoods extends BaseEntity<MallIntegralGoods>{
    private static final long serialVersionUID = 1L;


    /** id */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long id;


    /** 商品名称 */
    @Excel(name = "商品名称")
    @ApiModelProperty(value= "商品名称")
    @TableField("`goods_name`")
    private String goodsName;

    /** 商品id */
    @Excel(name = "商品id")
    @ApiModelProperty(value= "商品id")
    @TableField("`goods_id`")
    private Long goodsId;

    /** 货品id */
    @Excel(name = "货品id")
    @ApiModelProperty(value= "商品名称")
    @TableField("`product_id`")
    private Long productId;


    /** 积分商品分类id */
    @Excel(name = "积分商品分类id")
    @ApiModelProperty(value= "积分商品分类id")
    @TableField("`category_id`")
    private Long categoryId;


    /** 商品分类图 */
    @Excel(name = "商品封面图")
    @ApiModelProperty(value= "商品封面图")
    @TableField("`cover_img`")
    private String coverImg;


    /** 状态 (0 下架  1上架） */
    @Excel(name = "状态 (0 下架  1上架）")
    @ApiModelProperty(value= "状态 (0 下架  1上架）")
    @TableField("`status`")
    private Boolean status;


    /** 邮费 */
    @Excel(name = "邮费")
    @ApiModelProperty(value= "邮费")
    @TableField("`postage`")
    private Long postage;

    @ApiModelProperty(value = "已兑换数量")
    @TableField("`change_number`")
    private Long changeNumber;

    @ApiModelProperty(value = "库存")
    @TableField("`inventory`")
    private Long inventory;


    @ApiModelProperty(value = "图片")
    @TableField("`gallery`")
    private String gallery;

    /** 删除标志（0代表存在 2代表删除） */
    @TableLogic
    @TableField("`del_flag`")
    private String delFlag;


    @ApiModelProperty(value = "兑换价格")
    @TableField("`exchange_price`")
    private BigDecimal exchangePrice;

    @ApiModelProperty(value = "积分")
    @TableField("`integral`")
    private BigDecimal integral;

    /** 专区id */
    @Excel(name = "专区id")
    @ApiModelProperty(value= "专区id")
    @TableField("`zone_id`")
    private Long zoneId;

    @ApiModelProperty(value= "专区名称")
    @TableField(exist = false)
    private String zoneName;

    @ApiModelProperty(value= "商品原价格")
    @TableField(exist = false)
    private BigDecimal retailPrice;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    @ApiModelProperty(value= "显示顺序")
    @TableField("`sort`")
    private Integer sort;


    /** 租户ID */
    @Excel(name = "租户ID")
    @ApiModelProperty(value= "租户ID")
    @TableField("`tenant_id`")
    private Long tenantId;

    @ApiModelProperty(value= "是否分佣 1-是 0-否")
    private Integer isBonus;
}
